package com.kingboy.cloud.boot.utils;
/**
 * @author kingboy
 * @create 2020-08-04 16:48
 */

import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import javax.servlet.http.HttpServletRequest;
import java.util.Objects;

/**
 *@Description
 *@auther 郭金宝
 *@create 2020-08-04 16:48
 */
public class WebUtils {

    public static HttpServletRequest request() {
        return ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder.getRequestAttributes())).getRequest();
    }
}

